Optimal. Leaf size=337 \[ i b c^2 d^2 \text{PolyLog}\left (2,1-\frac{2}{1+i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )-i b c^2 d^2 \text{PolyLog}\left (2,-1+\frac{2}{1+i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )+2 b^2 c^2 d^2 \text{PolyLog}\left (2,-1+\frac{2}{1-i c x}\right )+\frac{1}{2} b^2 c^2 d^2 \text{PolyLog}\left (3,1-\frac{2}{1+i c x}\right )-\frac{1}{2} b^2 c^2 d^2 \text{PolyLog}\left (3,-1+\frac{2}{1+i c x}\right )+\frac{3}{2} c^2 d^2 \left (a+b \tan ^{-1}(c x)\right )^2+4 i b c^2 d^2 \log \left (2-\frac{2}{1-i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )-2 c^2 d^2 \tanh ^{-1}\left (1-\frac{2}{1+i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )^2-\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}-\frac{2 i c d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{x}-\frac{b c d^2 \left (a+b \tan ^{-1}(c x)\right )}{x}-\frac{1}{2} b^2 c^2 d^2 \log \left (c^2 x^2+1\right )+b^2 c^2 d^2 \log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.645457, antiderivative size = 337, normalized size of antiderivative = 1., number of steps used = 20, number of rules used = 15, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.6, Rules used = {4876, 4852, 4918, 266, 36, 29, 31, 4884, 4924, 4868, 2447, 4850, 4988, 4994, 6610} \[ i b c^2 d^2 \text{PolyLog}\left (2,1-\frac{2}{1+i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )-i b c^2 d^2 \text{PolyLog}\left (2,-1+\frac{2}{1+i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )+2 b^2 c^2 d^2 \text{PolyLog}\left (2,-1+\frac{2}{1-i c x}\right )+\frac{1}{2} b^2 c^2 d^2 \text{PolyLog}\left (3,1-\frac{2}{1+i c x}\right )-\frac{1}{2} b^2 c^2 d^2 \text{PolyLog}\left (3,-1+\frac{2}{1+i c x}\right )+\frac{3}{2} c^2 d^2 \left (a+b \tan ^{-1}(c x)\right )^2+4 i b c^2 d^2 \log \left (2-\frac{2}{1-i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )-2 c^2 d^2 \tanh ^{-1}\left (1-\frac{2}{1+i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )^2-\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}-\frac{2 i c d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{x}-\frac{b c d^2 \left (a+b \tan ^{-1}(c x)\right )}{x}-\frac{1}{2} b^2 c^2 d^2 \log \left (c^2 x^2+1\right )+b^2 c^2 d^2 \log (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4876
Rule 4852
Rule 4918
Rule 266
Rule 36
Rule 29
Rule 31
Rule 4884
Rule 4924
Rule 4868
Rule 2447
Rule 4850
Rule 4988
Rule 4994
Rule 6610
Rubi steps
\begin{align*} \int \frac{(d+i c d x)^2 \left (a+b \tan ^{-1}(c x)\right )^2}{x^3} \, dx &=\int \left (\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{x^3}+\frac{2 i c d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{x^2}-\frac{c^2 d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{x}\right ) \, dx\\ &=d^2 \int \frac{\left (a+b \tan ^{-1}(c x)\right )^2}{x^3} \, dx+\left (2 i c d^2\right ) \int \frac{\left (a+b \tan ^{-1}(c x)\right )^2}{x^2} \, dx-\left (c^2 d^2\right ) \int \frac{\left (a+b \tan ^{-1}(c x)\right )^2}{x} \, dx\\ &=-\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}-\frac{2 i c d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{x}-2 c^2 d^2 \left (a+b \tan ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac{2}{1+i c x}\right )+\left (b c d^2\right ) \int \frac{a+b \tan ^{-1}(c x)}{x^2 \left (1+c^2 x^2\right )} \, dx+\left (4 i b c^2 d^2\right ) \int \frac{a+b \tan ^{-1}(c x)}{x \left (1+c^2 x^2\right )} \, dx+\left (4 b c^3 d^2\right ) \int \frac{\left (a+b \tan ^{-1}(c x)\right ) \tanh ^{-1}\left (1-\frac{2}{1+i c x}\right )}{1+c^2 x^2} \, dx\\ &=2 c^2 d^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}-\frac{2 i c d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{x}-2 c^2 d^2 \left (a+b \tan ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac{2}{1+i c x}\right )+\left (b c d^2\right ) \int \frac{a+b \tan ^{-1}(c x)}{x^2} \, dx-\left (4 b c^2 d^2\right ) \int \frac{a+b \tan ^{-1}(c x)}{x (i+c x)} \, dx-\left (b c^3 d^2\right ) \int \frac{a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx-\left (2 b c^3 d^2\right ) \int \frac{\left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2}{1+i c x}\right )}{1+c^2 x^2} \, dx+\left (2 b c^3 d^2\right ) \int \frac{\left (a+b \tan ^{-1}(c x)\right ) \log \left (2-\frac{2}{1+i c x}\right )}{1+c^2 x^2} \, dx\\ &=-\frac{b c d^2 \left (a+b \tan ^{-1}(c x)\right )}{x}+\frac{3}{2} c^2 d^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}-\frac{2 i c d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{x}-2 c^2 d^2 \left (a+b \tan ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac{2}{1+i c x}\right )+4 i b c^2 d^2 \left (a+b \tan ^{-1}(c x)\right ) \log \left (2-\frac{2}{1-i c x}\right )+i b c^2 d^2 \left (a+b \tan ^{-1}(c x)\right ) \text{Li}_2\left (1-\frac{2}{1+i c x}\right )-i b c^2 d^2 \left (a+b \tan ^{-1}(c x)\right ) \text{Li}_2\left (-1+\frac{2}{1+i c x}\right )+\left (b^2 c^2 d^2\right ) \int \frac{1}{x \left (1+c^2 x^2\right )} \, dx-\left (i b^2 c^3 d^2\right ) \int \frac{\text{Li}_2\left (1-\frac{2}{1+i c x}\right )}{1+c^2 x^2} \, dx+\left (i b^2 c^3 d^2\right ) \int \frac{\text{Li}_2\left (-1+\frac{2}{1+i c x}\right )}{1+c^2 x^2} \, dx-\left (4 i b^2 c^3 d^2\right ) \int \frac{\log \left (2-\frac{2}{1-i c x}\right )}{1+c^2 x^2} \, dx\\ &=-\frac{b c d^2 \left (a+b \tan ^{-1}(c x)\right )}{x}+\frac{3}{2} c^2 d^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}-\frac{2 i c d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{x}-2 c^2 d^2 \left (a+b \tan ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac{2}{1+i c x}\right )+4 i b c^2 d^2 \left (a+b \tan ^{-1}(c x)\right ) \log \left (2-\frac{2}{1-i c x}\right )+2 b^2 c^2 d^2 \text{Li}_2\left (-1+\frac{2}{1-i c x}\right )+i b c^2 d^2 \left (a+b \tan ^{-1}(c x)\right ) \text{Li}_2\left (1-\frac{2}{1+i c x}\right )-i b c^2 d^2 \left (a+b \tan ^{-1}(c x)\right ) \text{Li}_2\left (-1+\frac{2}{1+i c x}\right )+\frac{1}{2} b^2 c^2 d^2 \text{Li}_3\left (1-\frac{2}{1+i c x}\right )-\frac{1}{2} b^2 c^2 d^2 \text{Li}_3\left (-1+\frac{2}{1+i c x}\right )+\frac{1}{2} \left (b^2 c^2 d^2\right ) \operatorname{Subst}\left (\int \frac{1}{x \left (1+c^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac{b c d^2 \left (a+b \tan ^{-1}(c x)\right )}{x}+\frac{3}{2} c^2 d^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}-\frac{2 i c d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{x}-2 c^2 d^2 \left (a+b \tan ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac{2}{1+i c x}\right )+4 i b c^2 d^2 \left (a+b \tan ^{-1}(c x)\right ) \log \left (2-\frac{2}{1-i c x}\right )+2 b^2 c^2 d^2 \text{Li}_2\left (-1+\frac{2}{1-i c x}\right )+i b c^2 d^2 \left (a+b \tan ^{-1}(c x)\right ) \text{Li}_2\left (1-\frac{2}{1+i c x}\right )-i b c^2 d^2 \left (a+b \tan ^{-1}(c x)\right ) \text{Li}_2\left (-1+\frac{2}{1+i c x}\right )+\frac{1}{2} b^2 c^2 d^2 \text{Li}_3\left (1-\frac{2}{1+i c x}\right )-\frac{1}{2} b^2 c^2 d^2 \text{Li}_3\left (-1+\frac{2}{1+i c x}\right )+\frac{1}{2} \left (b^2 c^2 d^2\right ) \operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,x^2\right )-\frac{1}{2} \left (b^2 c^4 d^2\right ) \operatorname{Subst}\left (\int \frac{1}{1+c^2 x} \, dx,x,x^2\right )\\ &=-\frac{b c d^2 \left (a+b \tan ^{-1}(c x)\right )}{x}+\frac{3}{2} c^2 d^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac{d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 x^2}-\frac{2 i c d^2 \left (a+b \tan ^{-1}(c x)\right )^2}{x}-2 c^2 d^2 \left (a+b \tan ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac{2}{1+i c x}\right )+b^2 c^2 d^2 \log (x)-\frac{1}{2} b^2 c^2 d^2 \log \left (1+c^2 x^2\right )+4 i b c^2 d^2 \left (a+b \tan ^{-1}(c x)\right ) \log \left (2-\frac{2}{1-i c x}\right )+2 b^2 c^2 d^2 \text{Li}_2\left (-1+\frac{2}{1-i c x}\right )+i b c^2 d^2 \left (a+b \tan ^{-1}(c x)\right ) \text{Li}_2\left (1-\frac{2}{1+i c x}\right )-i b c^2 d^2 \left (a+b \tan ^{-1}(c x)\right ) \text{Li}_2\left (-1+\frac{2}{1+i c x}\right )+\frac{1}{2} b^2 c^2 d^2 \text{Li}_3\left (1-\frac{2}{1+i c x}\right )-\frac{1}{2} b^2 c^2 d^2 \text{Li}_3\left (-1+\frac{2}{1+i c x}\right )\\ \end{align*}
Mathematica [A] time = 0.83999, size = 388, normalized size = 1.15 \[ -\frac{d^2 \left (2 i a b c^2 x^2 (\text{PolyLog}(2,-i c x)-\text{PolyLog}(2,i c x))+\frac{1}{12} b^2 c^2 x^2 \left (24 i \tan ^{-1}(c x) \text{PolyLog}\left (2,e^{-2 i \tan ^{-1}(c x)}\right )+24 i \tan ^{-1}(c x) \text{PolyLog}\left (2,-e^{2 i \tan ^{-1}(c x)}\right )+12 \text{PolyLog}\left (3,e^{-2 i \tan ^{-1}(c x)}\right )-12 \text{PolyLog}\left (3,-e^{2 i \tan ^{-1}(c x)}\right )+16 i \tan ^{-1}(c x)^3+24 \tan ^{-1}(c x)^2 \log \left (1-e^{-2 i \tan ^{-1}(c x)}\right )-24 \tan ^{-1}(c x)^2 \log \left (1+e^{2 i \tan ^{-1}(c x)}\right )-i \pi ^3\right )+4 i b^2 c x \left (i c x \left (\tan ^{-1}(c x)^2+\text{PolyLog}\left (2,e^{2 i \tan ^{-1}(c x)}\right )\right )+\tan ^{-1}(c x)^2-2 c x \tan ^{-1}(c x) \log \left (1-e^{2 i \tan ^{-1}(c x)}\right )\right )+2 a^2 c^2 x^2 \log (x)+4 i a^2 c x+a^2+4 i a b c x \left (c x \left (\log \left (c^2 x^2+1\right )-2 \log (c x)\right )+2 \tan ^{-1}(c x)\right )+2 a b \left (\tan ^{-1}(c x)+c x \left (c x \tan ^{-1}(c x)+1\right )\right )+b^2 \left (-2 c^2 x^2 \log \left (\frac{c x}{\sqrt{c^2 x^2+1}}\right )+\left (c^2 x^2+1\right ) \tan ^{-1}(c x)^2+2 c x \tan ^{-1}(c x)\right )\right )}{2 x^2} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 3.639, size = 1647, normalized size = 4.9 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (-\frac{4 \, a^{2} c^{2} d^{2} x^{2} - 8 i \, a^{2} c d^{2} x - 4 \, a^{2} d^{2} -{\left (b^{2} c^{2} d^{2} x^{2} - 2 i \, b^{2} c d^{2} x - b^{2} d^{2}\right )} \log \left (-\frac{c x + i}{c x - i}\right )^{2} -{\left (-4 i \, a b c^{2} d^{2} x^{2} - 8 \, a b c d^{2} x + 4 i \, a b d^{2}\right )} \log \left (-\frac{c x + i}{c x - i}\right )}{4 \, x^{3}}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} d^{2} \left (\int \frac{a^{2}}{x^{3}}\, dx + \int - \frac{a^{2} c^{2}}{x}\, dx + \int \frac{b^{2} \operatorname{atan}^{2}{\left (c x \right )}}{x^{3}}\, dx + \int \frac{2 i a^{2} c}{x^{2}}\, dx + \int \frac{2 a b \operatorname{atan}{\left (c x \right )}}{x^{3}}\, dx + \int - \frac{b^{2} c^{2} \operatorname{atan}^{2}{\left (c x \right )}}{x}\, dx + \int \frac{2 i b^{2} c \operatorname{atan}^{2}{\left (c x \right )}}{x^{2}}\, dx + \int - \frac{2 a b c^{2} \operatorname{atan}{\left (c x \right )}}{x}\, dx + \int \frac{4 i a b c \operatorname{atan}{\left (c x \right )}}{x^{2}}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (i \, c d x + d\right )}^{2}{\left (b \arctan \left (c x\right ) + a\right )}^{2}}{x^{3}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]